3.1079 \(\int \sqrt {\cos (c+d x)} (A+C \sec ^2(c+d x)) \, dx\)

Optimal. Leaf size=44 \[ \frac {2 (A-C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 C \sin (c+d x)}{d \sqrt {\cos (c+d x)}} \]

[Out]

2*(A-C)*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))/d+2*C*sin(d*x+c)
/d/cos(d*x+c)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {4066, 3012, 2639} \[ \frac {2 (A-C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 C \sin (c+d x)}{d \sqrt {\cos (c+d x)}} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[Cos[c + d*x]]*(A + C*Sec[c + d*x]^2),x]

[Out]

(2*(A - C)*EllipticE[(c + d*x)/2, 2])/d + (2*C*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])

Rule 2639

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2*EllipticE[(1*(c - Pi/2 + d*x))/2, 2])/d, x] /; FreeQ[{
c, d}, x]

Rule 3012

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*Cos[e
+ f*x]*(b*Sin[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Dist[(A*(m + 2) + C*(m + 1))/(b^2*(m + 1)), Int[(b*Sin[e
+ f*x])^(m + 2), x], x] /; FreeQ[{b, e, f, A, C}, x] && LtQ[m, -1]

Rule 4066

Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(m_)*((A_.) + (C_.)*sec[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[b^2, Int
[(b*Cos[e + f*x])^(m - 2)*(C + A*Cos[e + f*x]^2), x], x] /; FreeQ[{b, e, f, A, C, m}, x] &&  !IntegerQ[m]

Rubi steps

\begin {align*} \int \sqrt {\cos (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx &=\int \frac {C+A \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x)} \, dx\\ &=\frac {2 C \sin (c+d x)}{d \sqrt {\cos (c+d x)}}-(-A+C) \int \sqrt {\cos (c+d x)} \, dx\\ &=\frac {2 (A-C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 C \sin (c+d x)}{d \sqrt {\cos (c+d x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 1.65, size = 289, normalized size = 6.57 \[ \frac {\cos ^2(c+d x) \left (A+C \sec ^2(c+d x)\right ) \left (-\frac {4 \csc (c) (A \cos (2 c+d x)+(A-2 C) \cos (d x))}{d \sqrt {\cos (c+d x)}}+\frac {2 (A-C) \csc \left (\frac {c}{2}\right ) \sec \left (\frac {c}{2}\right ) \sqrt {e^{-i d x} \left (2 i \sin (c) \left (-1+e^{2 i d x}\right )+2 \cos (c) \left (1+e^{2 i d x}\right )\right )} \sqrt {i \sin (2 c) e^{2 i d x}+\cos (2 c) e^{2 i d x}+1} \left (3 \, _2F_1\left (-\frac {1}{4},\frac {1}{2};\frac {3}{4};-e^{2 i d x} (\cos (c)+i \sin (c))^2\right )+e^{2 i d x} \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};-e^{2 i d x} (\cos (c)+i \sin (c))^2\right )\right )}{3 d \left (i \sin (c) \left (-1+e^{2 i d x}\right )+\cos (c) \left (1+e^{2 i d x}\right )\right )}\right )}{2 (A \cos (2 (c+d x))+A+2 C)} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[Cos[c + d*x]]*(A + C*Sec[c + d*x]^2),x]

[Out]

(Cos[c + d*x]^2*(A + C*Sec[c + d*x]^2)*((-4*((A - 2*C)*Cos[d*x] + A*Cos[2*c + d*x])*Csc[c])/(d*Sqrt[Cos[c + d*
x]]) + (2*(A - C)*Csc[c/2]*(3*Hypergeometric2F1[-1/4, 1/2, 3/4, -(E^((2*I)*d*x)*(Cos[c] + I*Sin[c])^2)] + E^((
2*I)*d*x)*Hypergeometric2F1[1/2, 3/4, 7/4, -(E^((2*I)*d*x)*(Cos[c] + I*Sin[c])^2)])*Sec[c/2]*Sqrt[(2*(1 + E^((
2*I)*d*x))*Cos[c] + (2*I)*(-1 + E^((2*I)*d*x))*Sin[c])/E^(I*d*x)]*Sqrt[1 + E^((2*I)*d*x)*Cos[2*c] + I*E^((2*I)
*d*x)*Sin[2*c]])/(3*d*((1 + E^((2*I)*d*x))*Cos[c] + I*(-1 + E^((2*I)*d*x))*Sin[c]))))/(2*(A + 2*C + A*Cos[2*(c
 + d*x)]))

________________________________________________________________________________________

fricas [F]  time = 1.05, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (C \sec \left (d x + c\right )^{2} + A\right )} \sqrt {\cos \left (d x + c\right )}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(1/2)*(A+C*sec(d*x+c)^2),x, algorithm="fricas")

[Out]

integral((C*sec(d*x + c)^2 + A)*sqrt(cos(d*x + c)), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (C \sec \left (d x + c\right )^{2} + A\right )} \sqrt {\cos \left (d x + c\right )}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(1/2)*(A+C*sec(d*x+c)^2),x, algorithm="giac")

[Out]

integrate((C*sec(d*x + c)^2 + A)*sqrt(cos(d*x + c)), x)

________________________________________________________________________________________

maple [B]  time = 4.67, size = 149, normalized size = 3.39 \[ \frac {2 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-2 C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+4 C \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^(1/2)*(A+C*sec(d*x+c)^2),x)

[Out]

2*(A*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))-C*(si
n(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))+2*C*cos(1/2*d
*x+1/2*c)*sin(1/2*d*x+1/2*c)^2)/sin(1/2*d*x+1/2*c)/(2*cos(1/2*d*x+1/2*c)^2-1)^(1/2)/d

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (C \sec \left (d x + c\right )^{2} + A\right )} \sqrt {\cos \left (d x + c\right )}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(1/2)*(A+C*sec(d*x+c)^2),x, algorithm="maxima")

[Out]

integrate((C*sec(d*x + c)^2 + A)*sqrt(cos(d*x + c)), x)

________________________________________________________________________________________

mupad [B]  time = 5.19, size = 60, normalized size = 1.36 \[ \frac {2\,A\,\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,C\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{d\,\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^(1/2)*(A + C/cos(c + d*x)^2),x)

[Out]

(2*A*ellipticE(c/2 + (d*x)/2, 2))/d + (2*C*sin(c + d*x)*hypergeom([-1/4, 1/2], 3/4, cos(c + d*x)^2))/(d*cos(c
+ d*x)^(1/2)*(sin(c + d*x)^2)^(1/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \sqrt {\cos {\left (c + d x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**(1/2)*(A+C*sec(d*x+c)**2),x)

[Out]

Integral((A + C*sec(c + d*x)**2)*sqrt(cos(c + d*x)), x)

________________________________________________________________________________________